package com.chong.array;

public class ArrayDemo04 {
    public static void main(String[] args) {
        //二维数组
        int[][] arrays = {{1, 2}, {3, 4}, {4, 5}, {6, 7}};
        //printArray();
        //System.out.println(arrays[1][1]);

        for (int i = 0; i < arrays.length; i++) {
            for (int j = 0; j < arrays[i].length; j++) {
                System.out.println(arrays[i][j]);
            }
        }

    }


    //打印数组
    public static void printArray(int[] arrays) {
        for (int i = 0; i < arrays.length; i++) {
            System.out.print(arrays[i] + " ");
        }
    }
}
